﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Web.Script.Serialization;

namespace yeqw.FrameWork
{
    public static class IListExtensions
    {
        /// <summary>
        /// IsNullOrEmpty
        /// </summary>
        /// <returns></returns>
        public static bool IsNullOrEmpty(this IList list)
        {
            return list == null || list.Count < 1;
        }

        /// <summary>
        /// ToJSON
        /// </summary>
        /// <param name="input"></param>
        /// <param name="parrtern"></param>
        /// <returns></returns>
        public static string ToJSON(this IList list)
        {
            JavaScriptSerializer json = new JavaScriptSerializer();
            return json.Serialize(list);
        }
  
    }
}
